﻿using CommandLine;

namespace YtbDownloader.Core.Options;

internal class OptionY
{
    [Value(0)]
    public string DownloadUrl { get; set; }

    [Option('v', "verbose")]
    public bool IsDebug { get; set; }

    [Option("proxy")]
    public string Proxy { get; set; }

    [Option('f', "format")]
    public string Format { get; set; }

    [Option('o', "output")]
    public string OutputTemplate { get; set; }

    [Option("no-playlist")]
    public bool NoPlaylist { get; set; }

    [Option("write-auto-sub")]
    public bool IsDownloadAutoSub => !string.IsNullOrWhiteSpace(SubLang);

    [Option("sub-lang")]
    public string SubLang { get; init; }

    [Option('i', "ignore-errors")]
    public bool IsIgnoreError { get; set; }

    [Option("cookies")]
    public string Cookies { get; set; }

    [Option("user-agent")]
    public string UserAgent { get; set; }
}